package com.ecoolex.ying.space.entity;

import com.ecoolex.framework.common.annotation.Description;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import org.springframework.lang.NonNull;

/**
 *
 *<br>
 * 数据表： search_pick_goods
 *
 */
public class SearchPickGoods implements Serializable {
    /**
     *
     *   优选商品Id    <br>
     *<br>
     * 字段名： search_pick_goods.PickGoodsId
     */
    @Description({"优选商品Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer pickGoodsId;

    /**
     *
     *   商品Id    <br>
     *<br>
     * 字段名： search_pick_goods.GoodsId
     */
    @Description({"商品Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer goodsId;

    /**
     *
     *   商品名称    <br>
     *<br>
     * 字段名： search_pick_goods.Name
     */
    @Description({"商品名称", "不能为空", "数据长度: 400"})
    @NonNull
    private String name;

    /**
     *
     *   分类Id    <br>
     *<br>
     * 字段名： search_pick_goods.ClassifyId
     */
    @Description({"分类Id", "数据长度: 10"})
    private Integer classifyId;

    /**
     *
     *   标签Id列表    <br>
     *<br>
     * 字段名： search_pick_goods.LabelIds
     */
    @Description({"标签Id列表", "数据长度: 200"})
    private String labelIds;

    /**
     *
     *   专柜价格    <br>
     *<br>
     * 字段名： search_pick_goods.CounterPrice
     */
    @Description({"专柜价格", "数据长度: 18"})
    private BigDecimal counterPrice;

    /**
     *
     *   零售价格    <br>
     *<br>
     * 字段名： search_pick_goods.RetailPrice
     */
    @Description({"零售价格", "数据长度: 18"})
    private BigDecimal retailPrice;

    /**
     *
     *   价格币种    <br>
     *<br>
     * 字段名： search_pick_goods.CurrencyType
     */
    @Description({"价格币种", "数据长度: 10"})
    private String currencyType;

    /**
     *
     *   来源: 1: 严选    <br>
     *<br>
     * 字段名： search_pick_goods.Source
     */
    @Description({"来源: 1: 严选", "数据长度: 5"})
    private Integer source;

    /**
     *
     *   状态    <br>
     *<br>
     * 字段名： search_pick_goods.Status
     */
    @Description({"状态", "不能为空", "数据长度: 5"})
    @NonNull
    private Integer status;

    public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();

    public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();

    /**
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： search_pick_goods.Deleted
     */
    @Description({"逻辑删除", "不能为空", "数据长度: 1"})
    @NonNull
    private Boolean deleted;

    /**
     *
     *   创建用户    <br>
     *<br>
     * 字段名： search_pick_goods.CreateUser
     */
    @Description({"创建用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String createUser;

    /**
     *
     *   创建时间    <br>
     *<br>
     * 字段名： search_pick_goods.CreateTime
     */
    @Description({"创建时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date createTime;

    /**
     *
     *   修改用户    <br>
     *<br>
     * 字段名： search_pick_goods.UpdateUser
     */
    @Description({"修改用户", "不能为空", "数据长度: 50"})
    @NonNull
    private String updateUser;

    /**
     *
     *   修改时间    <br>
     *<br>
     * 字段名： search_pick_goods.UpdateTime
     */
    @Description({"修改时间", "不能为空", "数据长度: 26"})
    @NonNull
    private Date updateTime;

    /**
     *
     *   品牌Id    <br>
     *<br>
     * 字段名： search_pick_goods.BrandId
     */
    @Description({"品牌Id", "数据长度: 10"})
    private Integer brandId;

    /**
     *
     *   品牌名称    <br>
     *<br>
     * 字段名： search_pick_goods.BrandName
     */
    @Description({"品牌名称", "数据长度: 200"})
    private String brandName;

    /**
     *
     *   分类名称    <br>
     *<br>
     * 字段名： search_pick_goods.ClassifyName
     */
    @Description({"分类名称", "数据长度: 200"})
    private String classifyName;

    /**
     *
     *   分类Id    <br>
     *<br>
     * 字段名： search_pick_goods.ParentClassifyId
     */
    @Description({"分类Id", "不能为空", "数据长度: 10"})
    @NonNull
    private Integer parentClassifyId;

    /**
     *
     *   分类名称    <br>
     *<br>
     * 字段名： search_pick_goods.ParentClassifyName
     */
    @Description({"分类名称", "不能为空", "数据长度: 200"})
    @NonNull
    private String parentClassifyName;

    private static final long serialVersionUID = 1L;

    /**
     * 获取参数<br><br>
     *
     *   优选商品Id    <br>
     *<br>
     * 字段名： search_pick_goods.PickGoodsId
     */
    public Integer getPickGoodsId() {
        return pickGoodsId;
    }

    /**
     * 设置参数<br><br>
     *
     *   优选商品Id<br>
     *<br>
     * 字段名： search_pick_goods.PickGoodsId
     */
    public void setPickGoodsId(Integer pickGoodsId) {
        this.pickGoodsId = pickGoodsId;
    }

    /**
     * 获取参数<br><br>
     *
     *   商品Id    <br>
     *<br>
     * 字段名： search_pick_goods.GoodsId
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品Id<br>
     *<br>
     * 字段名： search_pick_goods.GoodsId
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /**
     * 获取参数<br><br>
     *
     *   商品名称    <br>
     *<br>
     * 字段名： search_pick_goods.Name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置参数<br><br>
     *
     *   商品名称<br>
     *<br>
     * 字段名： search_pick_goods.Name
     */
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   分类Id    <br>
     *<br>
     * 字段名： search_pick_goods.ClassifyId
     */
    public Integer getClassifyId() {
        return classifyId;
    }

    /**
     * 设置参数<br><br>
     *
     *   分类Id<br>
     *<br>
     * 字段名： search_pick_goods.ClassifyId
     */
    public void setClassifyId(Integer classifyId) {
        this.classifyId = classifyId;
    }

    /**
     * 获取参数<br><br>
     *
     *   标签Id列表    <br>
     *<br>
     * 字段名： search_pick_goods.LabelIds
     */
    public String getLabelIds() {
        return labelIds;
    }

    /**
     * 设置参数<br><br>
     *
     *   标签Id列表<br>
     *<br>
     * 字段名： search_pick_goods.LabelIds
     */
    public void setLabelIds(String labelIds) {
        this.labelIds = labelIds == null ? null : labelIds.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   专柜价格    <br>
     *<br>
     * 字段名： search_pick_goods.CounterPrice
     */
    public BigDecimal getCounterPrice() {
        return counterPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   专柜价格<br>
     *<br>
     * 字段名： search_pick_goods.CounterPrice
     */
    public void setCounterPrice(BigDecimal counterPrice) {
        this.counterPrice = counterPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   零售价格    <br>
     *<br>
     * 字段名： search_pick_goods.RetailPrice
     */
    public BigDecimal getRetailPrice() {
        return retailPrice;
    }

    /**
     * 设置参数<br><br>
     *
     *   零售价格<br>
     *<br>
     * 字段名： search_pick_goods.RetailPrice
     */
    public void setRetailPrice(BigDecimal retailPrice) {
        this.retailPrice = retailPrice;
    }

    /**
     * 获取参数<br><br>
     *
     *   价格币种    <br>
     *<br>
     * 字段名： search_pick_goods.CurrencyType
     */
    public String getCurrencyType() {
        return currencyType;
    }

    /**
     * 设置参数<br><br>
     *
     *   价格币种<br>
     *<br>
     * 字段名： search_pick_goods.CurrencyType
     */
    public void setCurrencyType(String currencyType) {
        this.currencyType = currencyType == null ? null : currencyType.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   来源: 1: 严选    <br>
     *<br>
     * 字段名： search_pick_goods.Source
     */
    public Integer getSource() {
        return source;
    }

    /**
     * 设置参数<br><br>
     *
     *   来源: 1: 严选<br>
     *<br>
     * 字段名： search_pick_goods.Source
     */
    public void setSource(Integer source) {
        this.source = source;
    }

    /**
     * 获取参数<br><br>
     *
     *   状态    <br>
     *<br>
     * 字段名： search_pick_goods.Status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置参数<br><br>
     *
     *   状态<br>
     *<br>
     * 字段名： search_pick_goods.Status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    public void andLogicalDeleted(boolean deleted) {
        setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
    }

    /**
     * 获取参数<br><br>
     *
     *   逻辑删除    <br>
     *<br>
     * 字段名： search_pick_goods.Deleted
     */
    public Boolean getDeleted() {
        return deleted;
    }

    /**
     * 设置参数<br><br>
     *
     *   逻辑删除<br>
     *<br>
     * 字段名： search_pick_goods.Deleted
     */
    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    /**
     * 获取参数<br><br>
     *
     *   创建用户    <br>
     *<br>
     * 字段名： search_pick_goods.CreateUser
     */
    public String getCreateUser() {
        return createUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建用户<br>
     *<br>
     * 字段名： search_pick_goods.CreateUser
     */
    public void setCreateUser(String createUser) {
        this.createUser = createUser == null ? null : createUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   创建时间    <br>
     *<br>
     * 字段名： search_pick_goods.CreateTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   创建时间<br>
     *<br>
     * 字段名： search_pick_goods.CreateTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   修改用户    <br>
     *<br>
     * 字段名： search_pick_goods.UpdateUser
     */
    public String getUpdateUser() {
        return updateUser;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改用户<br>
     *<br>
     * 字段名： search_pick_goods.UpdateUser
     */
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser == null ? null : updateUser.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   修改时间    <br>
     *<br>
     * 字段名： search_pick_goods.UpdateTime
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 设置参数<br><br>
     *
     *   修改时间<br>
     *<br>
     * 字段名： search_pick_goods.UpdateTime
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取参数<br><br>
     *
     *   品牌Id    <br>
     *<br>
     * 字段名： search_pick_goods.BrandId
     */
    public Integer getBrandId() {
        return brandId;
    }

    /**
     * 设置参数<br><br>
     *
     *   品牌Id<br>
     *<br>
     * 字段名： search_pick_goods.BrandId
     */
    public void setBrandId(Integer brandId) {
        this.brandId = brandId;
    }

    /**
     * 获取参数<br><br>
     *
     *   品牌名称    <br>
     *<br>
     * 字段名： search_pick_goods.BrandName
     */
    public String getBrandName() {
        return brandName;
    }

    /**
     * 设置参数<br><br>
     *
     *   品牌名称<br>
     *<br>
     * 字段名： search_pick_goods.BrandName
     */
    public void setBrandName(String brandName) {
        this.brandName = brandName == null ? null : brandName.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   分类名称    <br>
     *<br>
     * 字段名： search_pick_goods.ClassifyName
     */
    public String getClassifyName() {
        return classifyName;
    }

    /**
     * 设置参数<br><br>
     *
     *   分类名称<br>
     *<br>
     * 字段名： search_pick_goods.ClassifyName
     */
    public void setClassifyName(String classifyName) {
        this.classifyName = classifyName == null ? null : classifyName.trim();
    }

    /**
     * 获取参数<br><br>
     *
     *   分类Id    <br>
     *<br>
     * 字段名： search_pick_goods.ParentClassifyId
     */
    public Integer getParentClassifyId() {
        return parentClassifyId;
    }

    /**
     * 设置参数<br><br>
     *
     *   分类Id<br>
     *<br>
     * 字段名： search_pick_goods.ParentClassifyId
     */
    public void setParentClassifyId(Integer parentClassifyId) {
        this.parentClassifyId = parentClassifyId;
    }

    /**
     * 获取参数<br><br>
     *
     *   分类名称    <br>
     *<br>
     * 字段名： search_pick_goods.ParentClassifyName
     */
    public String getParentClassifyName() {
        return parentClassifyName;
    }

    /**
     * 设置参数<br><br>
     *
     *   分类名称<br>
     *<br>
     * 字段名： search_pick_goods.ParentClassifyName
     */
    public void setParentClassifyName(String parentClassifyName) {
        this.parentClassifyName = parentClassifyName == null ? null : parentClassifyName.trim();
    }

    public enum Deleted {
        NOT_DELETED(new Boolean("false"), "未删除"),
        IS_DELETED(new Boolean("true"), "已删除");

        private final Boolean value;

        private final String name;

        Deleted(Boolean value, String name) {
            this.value = value;
            this.name = name;
        }

        public Boolean getValue() {
            return this.value;
        }

        public Boolean value() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }

    public enum Column {
        pickGoodsId("PickGoodsId", "pickGoodsId", "INTEGER", false),
        goodsId("GoodsId", "goodsId", "INTEGER", false),
        name("Name", "name", "VARCHAR", true),
        classifyId("ClassifyId", "classifyId", "INTEGER", false),
        labelIds("LabelIds", "labelIds", "VARCHAR", false),
        counterPrice("CounterPrice", "counterPrice", "DECIMAL", false),
        retailPrice("RetailPrice", "retailPrice", "DECIMAL", false),
        currencyType("CurrencyType", "currencyType", "VARCHAR", false),
        source("Source", "source", "INTEGER", true),
        status("Status", "status", "INTEGER", true),
        deleted("Deleted", "deleted", "BIT", false),
        createUser("CreateUser", "createUser", "VARCHAR", true),
        createTime("CreateTime", "createTime", "TIMESTAMP", false),
        updateUser("UpdateUser", "updateUser", "VARCHAR", false),
        updateTime("UpdateTime", "updateTime", "TIMESTAMP", false),
        brandId("BrandId", "brandId", "INTEGER", false),
        brandName("BrandName", "brandName", "VARCHAR", false),
        classifyName("ClassifyName", "classifyName", "VARCHAR", false),
        parentClassifyId("ParentClassifyId", "parentClassifyId", "INTEGER", false),
        parentClassifyName("ParentClassifyName", "parentClassifyName", "VARCHAR", false),
        detail("Detail", "detail", "LONGVARCHAR", false),
        parameters("Parameters", "parameters", "LONGVARCHAR", true),
        labelIdList("LabelIdList", "labelIdList", "LONGVARCHAR", false),
        labelNameList("LabelNameList", "labelNameList", "LONGVARCHAR", false);

        private static final String BEGINNING_DELIMITER = "`";

        private static final String ENDING_DELIMITER = "`";

        private final String column;

        private final boolean isColumnNameDelimited;

        private final String javaProperty;

        private final String jdbcType;

        public String value() {
            return this.column;
        }

        public String getValue() {
            return this.column;
        }

        public String getJavaProperty() {
            return this.javaProperty;
        }

        public String getJdbcType() {
            return this.jdbcType;
        }

        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
            this.column = column;
            this.javaProperty = javaProperty;
            this.jdbcType = jdbcType;
            this.isColumnNameDelimited = isColumnNameDelimited;
        }

        public String desc() {
            return this.getEscapedColumnName() + " DESC";
        }

        public String asc() {
            return this.getEscapedColumnName() + " ASC";
        }

        public static Column[] excludes(Column ... excludes) {
            ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
            if (excludes != null && excludes.length > 0) {
                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
            }
            return columns.toArray(new Column[]{});
        }

        public String getEscapedColumnName() {
            if (this.isColumnNameDelimited) {
                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
            } else {
                return this.column;
            }
        }
    }
}